<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of ccvInvFileExtraCompStats</title>
  <meta name="keywords" content="ccvInvFileExtraCompStats">
  <meta name="description" content="CCVINVFILEExtraCOMPSTATS computes stats for the input inverted file, so that">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt;  <a href="index.html">caltech-image-search</a> &gt; ccvInvFileExtraCompStats.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for caltech-image-search&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->

<h1>ccvInvFileExtraCompStats
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>CCVINVFILEExtraCOMPSTATS computes stats for the input inverted file, so that</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function ccvInvFileExtraCompStats(ivf, weight, norm) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> CCVINVFILEExtraCOMPSTATS computes stats for the input inverted file, so that
 it's ready for search. This function MUST be called after inserting any
 new data, and BEFORE calling ccvInvFileSearch

 INPUTS
 ------
 ivf       - the input inverted file created before
 weight    - ['none'] the weighting to use
             'none'  -&gt; don't weight counts values
             'bin'   -&gt; binarize the counts
             'tf'    -&gt; term frequency, divide each count by the number of 
                         words in the doc
             'tfidf' -&gt; use tf-idf weighting
 norm      - ['none'] the normalization to use
             'none' -&gt; no normalization
             'l0'   -&gt; normalize by the number of words
             'l1'   -&gt; normalize so that the histogram sum = 1
             'l2'   -&gt; normalize so that histogram sum square = 1

 OUTPUTS
 -------

 See also <a href="ccvInvFileExtraInsert.html" class="code" title="function ivf = ccvInvFileExtraInsert(ivf, data, nwords, idshift)">ccvInvFileExtraInsert</a> ccvInvFileExtraLoad ccvInvFileExtraSave
 <a href="ccvInvFileExtraClean.html" class="code" title="function ccvInvFileExtraClean(ivf)">ccvInvFileExtraClean</a> <a href="ccvInvFileExtraSearch.html" class="code" title="function [ids dists] = ccvInvFileExtraSearch(ivf, data, dfeats, sfeats,weight, norm, dist, fdist, fthresh, ftype, nret, ovlponly, verbose)">ccvInvFileExtraSearch</a></pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function ccvInvFileExtraCompStats(ivf, weight, norm)</a>
0002 <span class="comment">% CCVINVFILEExtraCOMPSTATS computes stats for the input inverted file, so that</span>
0003 <span class="comment">% it's ready for search. This function MUST be called after inserting any</span>
0004 <span class="comment">% new data, and BEFORE calling ccvInvFileSearch</span>
0005 <span class="comment">%</span>
0006 <span class="comment">% INPUTS</span>
0007 <span class="comment">% ------</span>
0008 <span class="comment">% ivf       - the input inverted file created before</span>
0009 <span class="comment">% weight    - ['none'] the weighting to use</span>
0010 <span class="comment">%             'none'  -&gt; don't weight counts values</span>
0011 <span class="comment">%             'bin'   -&gt; binarize the counts</span>
0012 <span class="comment">%             'tf'    -&gt; term frequency, divide each count by the number of</span>
0013 <span class="comment">%                         words in the doc</span>
0014 <span class="comment">%             'tfidf' -&gt; use tf-idf weighting</span>
0015 <span class="comment">% norm      - ['none'] the normalization to use</span>
0016 <span class="comment">%             'none' -&gt; no normalization</span>
0017 <span class="comment">%             'l0'   -&gt; normalize by the number of words</span>
0018 <span class="comment">%             'l1'   -&gt; normalize so that the histogram sum = 1</span>
0019 <span class="comment">%             'l2'   -&gt; normalize so that histogram sum square = 1</span>
0020 <span class="comment">%</span>
0021 <span class="comment">% OUTPUTS</span>
0022 <span class="comment">% -------</span>
0023 <span class="comment">%</span>
0024 <span class="comment">% See also ccvInvFileExtraInsert ccvInvFileExtraLoad ccvInvFileExtraSave</span>
0025 <span class="comment">% ccvInvFileExtraClean ccvInvFileExtraSearch</span>
0026 <span class="comment">%</span>
0027 
0028 <span class="comment">% Author: Mohamed Aly &lt;malaa at vision d0t caltech d0t edu&gt;</span>
0029 <span class="comment">% Date: October 6, 2010</span>
0030 
0031 <span class="keyword">if</span> ~exist(<span class="string">'weight'</span>,<span class="string">'var'</span>) || isempty(weight), weight = <span class="string">'none'</span>; <span class="keyword">end</span>;
0032 <span class="keyword">if</span> ~exist(<span class="string">'norm'</span>,<span class="string">'var'</span>) || isempty(norm), norm = <span class="string">'none'</span>; <span class="keyword">end</span>;
0033 
0034 <span class="comment">%call the mex file</span>
0035 mxInvFileExtraCompStats(ivf, weight, norm);
0036</pre></div>
<hr><address>Generated on Fri 05-Nov-2010 19:46:04 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>